package org.budo.storm.jdbc.connection;

import java.sql.Connection;

import org.apache.storm.jdbc.common.ConnectionProvider;

import lombok.AllArgsConstructor;
import lombok.Getter;
import lombok.NoArgsConstructor;
import lombok.Setter;

/**
 * @author lmw
 */
@Getter
@Setter
@NoArgsConstructor
@AllArgsConstructor
public class ConnectionProviderWrapper implements ConnectionProvider {
    private static final long serialVersionUID = -5869258461841669464L;

    private ConnectionProvider connectionProvider;

    @Override
    public void prepare() {
        this.getConnectionProvider().prepare();
    }

    @Override
    public Connection getConnection() {
        return this.getConnectionProvider().getConnection();
    }

    @Override
    public void cleanup() {
        this.getConnectionProvider().cleanup();
    }
}